package com.demoworld.web.controllers;

import com.demoworld.aspect.LogInAndOutAspectable;
import com.demoworld.services.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by li_wb on 2017/9/20.
 */
@RestController
@RequestMapping("/config/")
public class TestController extends BaseController {
    @Autowired
    private ITestService service;

    @RequestMapping("getProductLineEntries")
    @LogInAndOutAspectable(clazzName = TestController.class)
    public String getProductLineEntries() {
        return service.getById("123123");
    }

    @RequestMapping("OhNo")
    @LogInAndOutAspectable(clazzName = TestController.class)
    public String getOhNo() {
        System.out.println("Oh no");
        return service.getById("123123");
    }
}
